﻿using System;

namespace VisionCloud.Api.Attributes
{
    /// <summary>
    /// 日志记录特性
    /// </summary>
    public class LogAttribute : Attribute
    {
        /// <summary>
        /// 是否需要记录请求参数
        /// </summary>
        public bool NeedRequestBody { get; set; } = false;
        /// <summary>
        /// 是否需要记录返回参数
        /// </summary>
        public bool NeedResponseBody { get; set; } = false;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="needRequestBody">是否需要记录请求参数</param>
        /// <param name="needResponseBody">是否需要记录返回参数</param>
        public LogAttribute(bool needRequestBody = false, bool needResponseBody = false)
        {
            NeedRequestBody = needRequestBody;
            NeedResponseBody = needResponseBody;
        }
    }
}
